package com.golden.management.service;

import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.golden.management.domain.FunctionDO;
import com.golden.management.domain.ResultDO;
import com.golden.management.query.FunctionExample;


/**
 * @author reagan
 * @Description:按钮接口对象
 */
@RestController
@RequestMapping("/api")
public interface IFucntionService {
	
	/**
	 * 添加按钮对象
	 * @param btnDO
	 * @return ResultDO
	 */
	@PostMapping("/function")
	public ResultDO add(@RequestBody FunctionDO domain);
	
	/**
	 * 删除按钮
	 * 
	 * 
	 * @param id 按钮ID
	 * @return ResultDO
	 */
	@DeleteMapping("/function/{id}")
	public ResultDO delete(@PathVariable(value = "id") Integer id);
	
	/**
	 * 修改菜单对象
	 * @param btnDO
	 * @return ResultDO
	 */
	public ResultDO edit(@RequestBody FunctionDO domain);
	
	
	/**
	 * 修改菜单对象
	 * @param id 按钮ID
	 * @return ResultDO
	 */
	@GetMapping("/function/{id}")
	public ResultDO get(@PathVariable(value = "id") Integer id);
	
	
	/**
	 * 查询按钮对象
	 * @param query 查询DO
	 * @return ResultDO
	 */
	@PostMapping("/functions")
	public ResultDO query(@RequestBody FunctionExample example);
	
	
}
